/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * successFrame.java
 *
 * Created on Oct 31, 2011, 7:01:28 PM
 */

package giormi;

import javax.swing.JFrame;

/**
 *
 * @author Ling
 */
public class successFrame extends javax.swing.JFrame {

    /** Creates new form successFrame */
    JFrame frame, main;
    public successFrame(JFrame as, MainFrame ma) {
        initComponents();
        this.setLocation(440, 240);
        this.setSize(460, 200);
        this.setResizable(false);
        this.setDefaultCloseOperation(javax.swing.JFrame.DO_NOTHING_ON_CLOSE);
        frame=as;
        main=ma;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        addsuccess = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Process Successful");
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        addsuccess.setText("Process successful. Changes have been made to the database.");
        getContentPane().add(addsuccess, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 30, -1, 70));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/giormi/sources/Button-Reminder-icon.png"))); // NOI18N
        getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1));

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/giormi/sources/Ok-icon.png"))); // NOI18N
        jButton1.setText("OK");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 100, 90, -1));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        frame.setVisible(false);
        this.setVisible(false);
        frame.dispose();
        this.dispose();
        main.setEnabled(true);
        main.setVisible(true);
    }//GEN-LAST:event_jButton1ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel addsuccess;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables

}
